<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="http://cdn.static.runoob.com/libs/jquery/1.10.2/jquery.min.js">
		</script>
		<script>
			$(document).ready(function() {
				$("p").eq(1).css("background-color", "yellow");
				$("p").filter(".intro").css("background-color","pink");
				$("p").has("span").css("color","pink");
				$("p").not(".intro").css("border","solid 1px blue");
				$("p").slice(2).css("text-decoration","line-through");
			});
		</script>
	</head>

	<body>

		<h1>欢迎来到我的主页</h1>
		<p>我的名字叫Donald (下标 0).</p>
		<p>Donald Duck (index 1).</p>
		<p>我住在<span>Duckburg</span>.(index 2).</p>
		<p class="intro">我最好的朋友是 Mickey (index 3).</p>

	</body>

</html>